<template>
	<view class="title-box">
		<u-section @click='handMore' sub-color='#0050A5' :show-line='showLine' :right='right' font-size='36' line-color='#0050A5'
		 color='#312D2D' :title="title" :sub-title="subTitle"></u-section>
		<view class="mt-20">
			<bs-line v-if='lineShow'></bs-line>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			//主标题
			title: {
				type: String,
				default: '标题'
			},
			// 是否显示左边竖线
			showLine: {
				type: Boolean,
				default: false
			},
			//是否显示右边文字
			right: {
				type: Boolean,
				default: false
			},
			//右边文字
			subTitle: {
				type: String,
				default: '更多'
			},
			lineShow: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {

			};
		},
		methods: {
			//更多
			handMore() {
				this.$emit('handMore')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.title-box {
		.title {
			font-size: 36rpx;
			color: $bs-color-title;
			font-weight: bold;
		}

		.title-line {
			font-size: 36rpx;
			color: $bs-color-title;
			font-weight: bold;
			padding-left: 20rpx;
			position: relative;

			&::before {
				content: '';
				position: absolute;
				left: 0;
				top: 50%;
				height: 32rpx;
				width: 8rpx;
				margin-top: -16rpx;
				background-color: $bs-color-theme;
			}
		}

		.more {
			color: $bs-color-theme;
		}
	}
</style>
